.pdf-viewer-card {
  margin-bottom: 16px;
  
  .pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    
    .file-info {
      .ant-typography {
        margin-bottom: 4px;
      }
    }
  }
  
  .pdf-content {
    position: relative;
    
    .pdf-embed-container {
      position: relative;
      
      .pdf-loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.9);
        z-index: 10;
      }
    }
  }
}

.pdf-fullscreen-modal {
  .ant-modal-content {
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  .ant-modal-header {
    flex-shrink: 0;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
  }
  
  .ant-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; // 重要：允许flex子元素收缩
  }
  
  .pdf-fullscreen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
  }
  
  .pdf-embed-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    
    iframe {
      flex: 1;
      width: 100% !important;
      min-height: 0;
      border: 1px solid #d9d9d9 !important;
      border-radius: 6px;
      background-color: #fff;
    }
  }
}

@media (max-width: 768px) {
  .pdf-viewer-card {
    .pdf-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
  }
  
  .pdf-fullscreen-modal {
    .ant-modal-content {
      margin: 0;
      height: 100vh;
      max-height: 100vh;
    }
  }
}